package architect;

import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.config.server.EnableConfigServer;

import java.util.concurrent.TimeUnit;

/**
 * Config Server启动类
 *
 * @author guanxin
 * @date 2018/4/11 9:41
 */

@EnableConfigServer
@EnableDiscoveryClient
@SpringBootApplication
public class ConfigServerApp implements CommandLineRunner {

    public static void main(String[] args) throws InterruptedException {
        SpringApplication.run(ConfigServerApp.class, args);
        TimeUnit.MINUTES.sleep(10);
        System.err.println("Config Server=============>>>>>>>>>>>>>服务关闭");
    }

    @Override
    public void run(String... args) throws Exception {
        System.out.println("Config Server=============>>>>>>>>>>>>>启动完毕");
    }
}
